[RFC] loading: always append bundled depots to DEPOT_PATH unless JULIA_DEPOT_PATH_BUNDLED is false#60282
Conversation
When JULIA_DEPOT_PATH is set, the bundled depots are now always appended to DEPOT_PATH, removing the common footgun of forgetting the trailing ':' or ';'. A new environment variable JULIA_DEPOT_PATH_BUNDLED can be set to false to disable this behavior for users who explicitly want to exclude bundled resources.
|
I am not a fan, but I understand where you are coming from. The semantics of environment variables has some long traditions. As an example Are three very different operations. Now with so instead we use (but note that So currently we have two semantically distinct operations:
So this PR makes the second one harder to access and is contra to every other UNIX program I ever used. |
I believe one difference here is that |
|
What use case is there for not including the bundled depot? Understanding that would help here. |
Eh, I don't think unix is the one to follow here, as the most popular unix systems out there implement all 5 of the 3 options you outlined. (linux has assumed current working directory to be either at the end (old behavior) or the start (even older behavior) or drops it entirely (newer behavior), while the empty variable means default path but empty string means current working directory, while BSD uses the empty string to indicate where to put the current working directory in the path, even for empty string, with the default path having |
|
I don't really see what the issue here is. Is the issue that leaving off the "bundled" depot is too disruptive and rarely what anyone wants? I suppose we could have no empty entry still include the bundled depot since that's the real issue here. I think an explicit |
|
It seems to me that #51448 was probably a mistake—it was a different attempt to solve this problem, namely that you almost never want to not include the bundled depot. When you write |
|
ChatGPT on prior art for this behavior (before #51448 half broke it): https://chatgpt.com/share/697bb2d9-5a98-8008-99cb-60caf3bd2c35. TLDR: MANPATH, INFOPATH, and TEXINPUTS work like this. As I've indicated, it would be better to just fully deprecate (break) this behavior entirely, rather than continue to half-break it. There are also real issues that it would be better to address: one may want to keep some of the default paths, not all of them and we don't have a way to do that in the shell. Something like |
|
Did triage ever discuss this? I don't see a comment here on behalf of triage. |
|
We did. My comment was post-triage, but only on my own behalf. |
The requirement to have a trailing
:or;(windows) onJULIA_DEPOT_PATHis a really unfriendly footgun.With this proposal when
JULIA_DEPOT_PATHis set, the bundled depots are now always appended toBase.DEPOT_PATH, removing the need for the trailing:or;(but allowing it if it is there).A new environment variable
JULIA_DEPOT_PATH_BUNDLEDcan be set to false to disable this behavior for users who explicitly want to exclude bundled resources (who should be very rare).cc. @vchuravy @maleadt @Keno